home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
cstdio.arc
/
SRC.ARC
/
LSEEK.A
< prev
next >
Wrap
Text File
|
1985-05-17
|
534b
|
31 lines
; lseek.a - move read/write pointer.
; (C) Copyright 1984, 1985 Gregory R. Mansfield - All Rights Reserved.
; G. R. Mansfield. 84/06/22.
; Ver 1.0-5517.
include "include/msdos.ah"
dseg
public errno_
cseg
public lseek_
; long lseek(fd, n, o)
; int fd, o;
; long n;
lseek_: mov bx,sp
mov ax,[bx+8] ; origin
mov cx,[bx+6] ; offset
mov dx,[bx+4]
mov bx,[bx+2] ; file handle
mov ah,FR_MFP ; move file pointer
int I_FCN
jnb lsk1 ; if no error
mov errno_,ax
mov ax,-1
mov dx,ax
lsk1: ret